<template>
  <div class="home">
    <button @click="getHandle">get请求</button>
    <button @click="getMineHandle">get封装请求</button>
  </div>
</template>

<script>
// @ is an alias to /src

import axios from "axios";
import {test} from "@/api/home.js"

export default {
  name: 'Home',
  data(){
    return{
      height: 10,
      topHeight: 60
    }
  },
  mounted() {
    // 获取屏幕的高度
    this.height = window.innerHeight - this.topHeight
  },
  methods: {
    getHandle(){
      axios.get('https://open.nfclass.com/management/ai/test')
          .then(res=>console.log("res",res))
    },
    getMineHandle(){
      let params = {name:"张三"}
      let data = test("/ai/test",params)
      console.log("data",data)
    }
  }
}
</script>

<style scoped>

</style>
